$BrighnessDownCommand=  $(brillo -U 10)
$BrightnessUpCommand=   $(brillo -A 10)
$VolumeDownCommand=     $(pamixer -d 10)
$VolumeUpCommand=       $(pamixer -i 10)
$VolumeMuteCommand=     $(pamixer -t)
$MicMuteCommand=        $(pamixer --default-source -t)
$MicMuteLedScript=      $($HOME/.scripts/micbacklight)


# Print
bind = , Print, exec, $HOME/.scripts/hyprshot -m region -o $HOME/Pictures/Screenshots
bind = SHIFT, Print, exec, $HOME/.scripts/hyprshot -m output -o $HOME/Pictures/Screenshots
bind = SUPER SHIFT, Print, exec, $HOME/.scripts/hyprshot -m window -o $HOME/Pictures/Screenshots


# Launchers
bind = SUPER, Return, exec, alacritty
bind = SUPER, R, exec, rofi -show drun
bind = SUPER, B, exec, python $HOME/.scripts/waybar-toggle.py

# Bindings
bind = CTRL ALT, Delete, exit
bind = SUPER, q, killactive
bind = SUPER, f, togglefloating
bind = SUPER, h, fakefullscreen
bind = SUPER, g, fullscreen
bind = SUPER, u, togglesplit

# Move focus
bind = SUPER, k, movefocus, u
bind = SUPER, j, movefocus, d
bind = SUPER, l, movefocus, r
bind = SUPER, h, movefocus, l

# to switch between windows in a floating workspace
bind=SUPER, Tab, cyclenext,
bind=SUPER, Tab, bringactivetotop,

# Move window
bind = SUPER SHIFT, k, movewindow, u
bind = SUPER SHIFT, j, movewindow, d
bind = SUPER SHIFT, l, movewindow, r
bind = SUPER SHIFT, h, movewindow, l

# Switch workspaces
bind = SUPER, left,   workspace, e-1
bind = SUPER, right, workspace, e+1
bind = SUPER, 1, workspace, 1
bind = SUPER, 2, workspace, 2
bind = SUPER, 3, workspace, 3
bind = SUPER, 4, workspace, 4
bind = SUPER, 5, workspace, 5
bind = SUPER, 6, workspace, 6
bind = SUPER, 7, workspace, 7
bind = SUPER, 8, workspace, 8
bind = SUPER, 9, workspace, 9

# Window
binde = SUPER CTRL, k, resizeactive, 0 -20
binde = SUPER CTRL, j, resizeactive, 0 20
binde = SUPER CTRL, l, resizeactive, 20 0
binde = SUPER CTRL, h, resizeactive, -20 0
binde = SUPER ALT,  k, moveactive, 0 -20
binde = SUPER ALT,  j, moveactive, 0 20
binde = SUPER ALT,  l, moveactive, 20 0
binde = SUPER ALT,  h, moveactive, -20 0

# Move active window to workspace
bind = SUPER SHIFT, right, movetoworkspace, e+1
bind = SUPER SHIFT, left,  movetoworkspace, e-1
bind = SUPER SHIFT, 1, movetoworkspace, 1
bind = SUPER SHIFT, 2, movetoworkspace, 2
bind = SUPER SHIFT, 3, movetoworkspace, 3
bind = SUPER SHIFT, 4, movetoworkspace, 4
bind = SUPER SHIFT, 5, movetoworkspace, 5
bind = SUPER SHIFT, 6, movetoworkspace, 6
bind = SUPER SHIFT, 7, movetoworkspace, 7
bind = SUPER SHIFT, 8, movetoworkspace, 8
bind = SUPER SHIFT, 9, movetoworkspace, 9

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow

# Laptop
bind =,XF86AudioMicMute,exec,$MicMuteCommand && $MicMuteLedScript
bind =,XF86MonBrightnessDown,exec,$BrighnessDownCommand
bind =,XF86MonBrightnessUp,exec,$BrightnessUpCommand
bind =,XF86AudioMute,exec,$VolumeMuteCommand
bind =,XF86AudioLowerVolume,exec,$VolumeDownCommand
bind =,XF86AudioRaiseVolume,exec,$VolumeUpCommand
bind =,XF86AudioPlay,exec,playerctl play-pause
bind =,XF86AudioPause,exec,playerctl play-pause
bind =,XF86AudioNext,workspace,9

bind =,F7,exec,$MicMuteCommand && $MicMuteLedScript
bind =,F5,exec,$VolumeDownCommand
bind =,F6,exec,$VolumeUpCommand

# Scripts
bind = SUPER SHIFT, W, exec, $HOME/.config/hypr/scripts/wallpaper
